/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dto;

import java.util.Date;

/**
 *
 * @author lab
 */
public class Post {

    private int id;
    private String title;
    private String content;
    private PostCategory category;
    private dto.Class cls;
    private User author;
    private Date modifiedDate;
    private boolean state;
    private boolean isRead;
    private boolean isReplied;

    public Post() {
        id = 0;
        title = "";
        content = "";
        category = new PostCategory();
        cls = new Class();
        author = new User();
        modifiedDate = new Date();
        state = false;
    }

    public Post(String title, String content, boolean isPublic, PostCategory category, User author) {
        id = 0;
        this.title = title;
        this.content = content;
        this.category = category;
        this.cls = new Class();
        this.author = author;
        this.modifiedDate = new Date();
        this.state = false;
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the content
     */
    public String getContent() {
        return content;
    }

    /**
     * @param content the content to set
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * @return the category
     */
    public PostCategory getCategory() {
        return category;
    }

    /**
     * @param category the category to set
     */
    public void setCategory(PostCategory category) {
        this.category = category;
    }

    /**
     * @return the cls
     */
    public dto.Class getCls() {
        return cls;
    }

    /**
     * @param cls the cls to set
     */
    public void setCls(dto.Class cls) {
        this.cls = cls;
    }

    /**
     * @return the author
     */
    public User getAuthor() {
        return author;
    }

    /**
     * @param author the author to set
     */
    public void setAuthor(User author) {
        this.author = author;
    }

    /**
     * @return the modifiedDate
     */
    public Date getModifiedDate() {
        return modifiedDate;
    }

    /**
     * @param modifiedDate the modifiedDate to set
     */
    public void setModifiedDate(Date modifiedDate) {
        this.modifiedDate = modifiedDate;
    }

    /**
     * @return the state
     */
    public boolean isState() {
        return state;
    }

    /**
     * @param state the state to set
     */
    public void setState(boolean state) {
        this.state = state;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @return the isRead
     */
    public boolean isRead() {
        return isRead;
    }

    /**
     * @param isRead the isRead to set
     */
    public void setIsRead(boolean isRead) {
        this.isRead = isRead;
    }

    /**
     * @return the isReplied
     */
    public boolean isReplied() {
        return isReplied;
    }

    /**
     * @param isReplied the isReplied to set
     */
    public void setIsReplied(boolean isReplied) {
        this.isReplied = isReplied;
    }
}
